package com.qianniu.napi.admin.mapper;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.qianniu.napi.admin.entity.Category;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.qianniu.napi.admin.entity.Permission;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
  *  Mapper 接口
 * </p>
 *
 * @author chenxuebin
 * @since 2017-11-10
 */
public interface CategoryMapper extends BaseMapper<Category> {

//    @Select("SELECT id,type,pid,paixu,LEVEL,NAME,CODE,isUse,icon FROM t_category WHERE pid=#{pid}")

    @Select("SELECT id,type,pid,paixu,LEVEL,NAME,CODE,isUse,icon FROM t_category where 1=1 ${ew.sqlSegment}")
    List<Category> selectList(Page page , @Param("ew")Wrapper<Category> entity);

}